﻿// Decompiled with JetBrains decompiler
// Type: DnProcessSimulateCommands.AutomaticInterferenceVolumeCreation.CApAIVCInterferenceVolumeDataProvider
// Assembly: DnProcessSimulateCommands, Version=2402.0.0.890, Culture=neutral, PublicKeyToken=null
// MVID: A885D881-AEDF-447E-852A-6F13102E089C
// Assembly location: C:\Program Files\Tecnomatix_2402\eMPower\DotNetCommands\DnProcessSimulateCommands.dll

using DnProcessSimulateCommands.InterferenceVolume;
using System.Collections.ObjectModel;
using Tecnomatix.Engineering;


namespace DnProcessSimulateCommands.AutomaticInterferenceVolumeCreation;

internal class CApAIVCInterferenceVolumeDataProvider : IUiIVInterferenceVolumeDataProvider
{
  private TxSweptVolume m_firstSV;
  private TxSweptVolume m_secondSV;
  private string m_ivName;

  public TxObjectList IVData_SweptVolumes
  {
    get
    {
      TxObjectList dataSweptVolumes = new TxObjectList(2);
      if (TxSweptVolume.op_Inequality(this.m_firstSV, (ITxObject) null))
        ((Collection<ITxObject>) dataSweptVolumes).Add((ITxObject) this.m_firstSV);
      if (TxSweptVolume.op_Inequality(this.m_secondSV, (ITxObject) null))
        ((Collection<ITxObject>) dataSweptVolumes).Add((ITxObject) this.m_secondSV);
      return dataSweptVolumes;
    }
  }

  public string IVData_Name => this.m_ivName;

  public TxColor IVData_Color
  {
    get
    {
      TxColor ivDataColor = TxColor.FromBgrColor(TxApplication.Options.Color.InterferenceVolumeColor);
      ivDataColor.Transparency = 1.0;
      return ivDataColor;
    }
  }

  public CApAIVCInterferenceVolumeDataProvider(TxSweptVolume firstSV, TxSweptVolume secondSV)
  {
    this.m_firstSV = firstSV;
    this.m_secondSV = secondSV;
    this.m_ivName = $"IV_{this.m_firstSV.Name}_{this.m_secondSV.Name}";
  }
}
